﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 替代料管理基础输入参数
/// </summary>
public class ItemsubstitutionsBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 源物料
    /// </summary>
    public virtual long? PartNumId { get; set; }
    
    /// <summary>
    /// 替代物料
    /// </summary>
    public virtual long? PartNumIds { get; set; }
    
    /// <summary>
    /// 工单
    /// </summary>
    public virtual long? TicketsId { get; set; }
    
    /// <summary>
    /// 有效开始日期
    /// </summary>
    public virtual DateTime? StartTime { get; set; }
    
    /// <summary>
    /// 有效截止日期
    /// </summary>
    public virtual DateTime? EndTime { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
}

/// <summary>
/// 替代料管理分页查询输入参数
/// </summary>
public class PageItemsubstitutionsInput : BasePageInput
{
    /// <summary>
    /// 源物料
    /// </summary>
    public long? PartNumId { get; set; }
    
    /// <summary>
    /// 替代物料
    /// </summary>
    public long? PartNumIds { get; set; }
    
    /// <summary>
    /// 工单
    /// </summary>
    public long? TicketsId { get; set; }
    
    /// <summary>
    /// 有效开始日期范围
    /// </summary>
     public DateTime?[] StartTimeRange { get; set; }
    
    /// <summary>
    /// 有效截止日期范围
    /// </summary>
     public DateTime?[] EndTimeRange { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 替代料管理增加输入参数
/// </summary>
public class AddItemsubstitutionsInput
{
    /// <summary>
    /// 源物料
    /// </summary>
    public long? PartNumId { get; set; }
    
    /// <summary>
    /// 替代物料
    /// </summary>
    public long? PartNumIds { get; set; }
    
    /// <summary>
    /// 工单
    /// </summary>
    public long? TicketsId { get; set; }
    
    /// <summary>
    /// 有效开始日期
    /// </summary>
    public DateTime? StartTime { get; set; }
    
    /// <summary>
    /// 有效截止日期
    /// </summary>
    public DateTime? EndTime { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? Remark { get; set; }
    
}

/// <summary>
/// 替代料管理删除输入参数
/// </summary>
public class DeleteItemsubstitutionsInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 替代料管理更新输入参数
/// </summary>
public class UpdateItemsubstitutionsInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 源物料
    /// </summary>    
    public long? PartNumId { get; set; }
    
    /// <summary>
    /// 替代物料
    /// </summary>    
    public long? PartNumIds { get; set; }
    
    /// <summary>
    /// 工单
    /// </summary>    
    public long? TicketsId { get; set; }
    
    /// <summary>
    /// 有效开始日期
    /// </summary>    
    public DateTime? StartTime { get; set; }
    
    /// <summary>
    /// 有效截止日期
    /// </summary>    
    public DateTime? EndTime { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? Remark { get; set; }
    
}

/// <summary>
/// 替代料管理主键查询输入参数
/// </summary>
public class QueryByIdItemsubstitutionsInput : DeleteItemsubstitutionsInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataItemsubstitutionsInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 替代料管理数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportItemsubstitutionsInput : BaseImportInput
{
    /// <summary>
    /// 源物料 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? PartNumId { get; set; }
    
    /// <summary>
    /// 源物料 文本
    /// </summary>
    [ImporterHeader(Name = "源物料")]
    [ExporterHeader("源物料", Format = "", Width = 25, IsBold = true)]
    public string PartNumFkDisplayName { get; set; }
    
    /// <summary>
    /// 替代物料 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? PartNumIds { get; set; }
    
    /// <summary>
    /// 替代物料 文本
    /// </summary>
    [ImporterHeader(Name = "替代物料")]
    [ExporterHeader("替代物料", Format = "", Width = 25, IsBold = true)]
    public string PartNumIdsFkDisplayName { get; set; }
    
    /// <summary>
    /// 工单 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? TicketsId { get; set; }
    
    /// <summary>
    /// 工单 文本
    /// </summary>
    [ImporterHeader(Name = "工单")]
    [ExporterHeader("工单", Format = "", Width = 25, IsBold = true)]
    public string TicketsFkDisplayName { get; set; }
    
    /// <summary>
    /// 有效开始日期
    /// </summary>
    [ImporterHeader(Name = "有效开始日期")]
    [ExporterHeader("有效开始日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? StartTime { get; set; }
    
    /// <summary>
    /// 有效截止日期
    /// </summary>
    [ImporterHeader(Name = "有效截止日期")]
    [ExporterHeader("有效截止日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? EndTime { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? Remark { get; set; }
    
}
